package practice.w912;

import collection.Point;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo2 {
    public static void main(String[] args)
    {
        Collection c= new ArrayList();
        c.add("你好");
        c.add("tcl");
        c.add(new Point(1,2));
        c.add(new Point(3,4));

        Point p = new Point(1,2);
        System.out.println(c.contains(p));
        Point q = new Point(5,6);
        System.out.println(c.contains(q));

        boolean remove =c.remove(p);
        System.out.println("是否删除："+remove);
        System.out.println(c);


//        Collection c= new ArrayList();
//        c.add("你好");
//        c.add("tcl");
//        c.add(new Point(1,2));
//        c.add(new Point(3,4));
//
//        Point p = new Point(1,2);
//        System.out.println(c.contains(p));
//        Point q = new Point(5,6);
//        System.out.println(c.contains(q));
//
//        boolean remove =c.remove(p);
//        System.out.println("是否删除："+remove);
//        System.out.println(c);

    }
}
